﻿// identify modules
angular.module('app.common', []);
angular.module('app.authenticate', []);
angular.module('app.image', []);
angular.module('app.library', []);
angular.module('app.search', []);
angular.module('app.user', []);
// default app module and dependencies
angular.module('app', ['ui.router', 'ui.slider', 'ng', 'ngResource', 'timer', 'ui.bootstrap.modal',
	'app.common', 'app.authenticate',
	'app.image', 'app.library', 'app.search', 'app.user']);
// set the http provider
angular.module('app').config(['$httpProvider', function ($httpProvider) {
	$httpProvider.defaults.withCredentials = true;
}]);
// start the application
angular.module('app').run(['$rootScope', '$state', '$stateParams',
	function ($rootScope, $state, $stateParams) {
		'use strict';

		$rootScope.$state = $state;
		$rootScope.$stateParams = $stateParams;
		// start on the search screen
		$state.transitionTo('search');
	}]);